<include file="public@storage"/>
<style>
    #form {
        margin-top: 100px;
        padding-left: 50px;
        padding-right: 50px;
    }
</style>
</head>
<body>

<div>
    <form class="form-horizontal table" id="form" action="{:url('storage/ClientPda/editClientVersion')}" method="post">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">客户端版本信息</h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <input type="hidden" name="id" id="id" value="{$clientVersionInfo.id}">
                    <label class="col-md-2 control-label" for="name">版本名称：</label>
                    <div class="col-md-2">
                        <input type="text" name="name" id="name" value="{$clientVersionInfo.name}" class="form-control" placeholder="必填项">
                        <span id="nameError" style="color: red"></span>
                    </div>

                    <label class="col-md-2 control-label" for="major_version">主版本号：</label>
                    <div class="col-md-2">
                        <input type="text" name="major_version" id="major_version" value="{$clientVersionInfo.major_version}"
                               class="form-control" placeholder="填写数字" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();">
                        <span id="major_versionError"></span>
                    </div>

                    <label class="col-md-2 control-label" for="minor_version">次版本号：</label>
                    <div class="col-md-2">
                        <input type="text" name="minor_version" id="minor_version" value="{$clientVersionInfo.minor_version}"
                               class="form-control" placeholder="填写数字" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();">
                        <span id="minor_versionError"></span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label" for="url">下载链接：</label>
                    <div class="col-md-2">
                        <input type="text" name="url" id="url" disabled="disabled" value="{$clientVersionInfo.url}" class="form-control"
                               placeholder="必填项">
                        <span id="urlError"></span>
                    </div>

                </div>

                <div class="form-group text-center">
                    <button type="submit" class="mui-btn mui-btn--raised mui-btn--primary" id="submit">保存</button>
                    &nbsp; &nbsp;
                    <button type="button" class="mui-btn mui-btn--raised mui-btn--primary" onclick="history.go(-1)">取消</button>
                </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>